package tazadum.util;

public abstract class Pair<F, S> {
	public abstract F first();

	public abstract S second();

	@Override
	public String toString() {
		return "(" + String.valueOf(first()) + ", " + String.valueOf(second())
				+ ")";
	}

	public static <F, S> Pair<F, S> create(final F first, final S second) {
		return new Pair<F, S>() {
			@Override
			public F first() {
				return first;
			}

			@Override
			public S second() {
				return second;
			}
		};
	}
}
